home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d13
/
chart.arc
/
CHART.BAS
next >
Wrap
BASIC Source File
|
1988-04-30
|
4KB
|
136 lines
1 REM ************** ANCESTRY CHART PROGRAM **************
2 REM
3 REM VERSION OF PEDIGREE CHART PROGRAM BY JOHN E. ERICSON
4 REM REWRITTEN FOR IBM PRESONAL COMPUTER BY JOHN E SCULLY
10 CLS:KEY OFF
24 DIM N$(31)
25 D$=CHR$(4)
30 GOSUB 100:REM ERASE
40 GOTO 1000:REM MENU
98 REM ********** ERASE CHART SUBROUTINE **********
100 FOR I=1 TO 31
110 N$(I)=""
120 NEXT I
130 RETURN
198 REM ************ ENTER ROUTINE *********8
200 CLS:GOSUB 100:REM CLEAR
205 LOCATE 2,5:PRINT "ENTER NAMES (PRESS R TO RETURN TO MENU)"
209 I=0
210 I=I+1:IF I=32 THEN 1000
220 PRINT "NAME #";I;TAB(11)
225 INPUT"";A$
227 IF A$="" THEN 210
230 IF A$="R" THEN 1000
232 IF A$="r" THEN 1000
240 N$(I)=A$
250 GOTO 210
260 GOTO 990:REM RETURN TO MENU
270 IF I<>16 THEN 340
298 REM LOOK
300 CLS
305 LOCATE 4,20
310 FOR I=1 TO 31
320 IF I<>16 THEN 340
330 PRINT:INPUT"PRESS ENTER TO CONTINUE";A$:CLS:LOCATE 4,2
340 A=I:A$=STR$(A)
350 PRINT TAB(3-LEN(A$));A$;"> ";N$(A)
370 NEXT I
380 GOTO 990:REM CONTINUE
398 REM ********** READ CHART FROM DISK *********
400 CLS:GOSUB 2000:REM FILE NAME
420 OPEN F$ FOR INPUT AS #1
440 FOR I=1 TO 31
450 INPUT#1,N$(I)
460 NEXT I
470 CLOSE #1:GOTO 1000
598 REM ********* SAVE CHART ON DISK ***********
600 CLS:GOSUB 2000:REM FILE NAME
610 OPEN F$ FOR APPEND AS #1
630 FOR I=1 TO 31
640 WRITE#1,N$(I)
650 NEXT I
660 CLOSE #1:GOTO 1000
665 IF C$="" THEN 1000
670 GOTO 1000:REM RETURN TO MAIN MENU
698 REM DELETE
700 GOSUB 2000:REM FILE NAME
720 GOTO 990:REM RETURN TO MAIN MENU
798 REM ******* MODIFY LIST ROUTINE *********
800 CLS:LOCATE 8,15
805 INPUT"ENTER NUMBER OF NAME ";A
810 IF A=0 THEN 890
820 IF A<1 OR A>31 OR A <> INT (A) THEN PRINT "INVALID ENTRY":GOTO 800
830 LOCATE 11,15:PRINT "NAME #";A;"> ";N$(A)
840 LOCATE 13,15:INPUT"IS THIS THE CORRECT NAME, Y OR N ";A$
850 IF A$="Y" THEN 1000
855 IF A$="y" THEN 1000
856 IF A$="yes" THEN 1000
857 IF A$="YES" THEN 1000
860 LOCATE 15,15:INPUT "ENTER CORRECT NAME ";N$(A)
890 GOTO 1000:REM RETURN TO MAIN MENU
990 PRINT:INPUT"PRESS ENTER TO RETURN TO MENU";A$
998 REM ******* MENU *********
1000 CLS:LOCATE 2,26:PRINT "ANCESTRY CHART PROGRAM"
1005 LOCATE 3,26:PRINT STRING$(22,196)
1010 LOCATE 5,26:PRINT "A. ERASE LIST"
1020 LOCATE 7,26:PRINT "B. NEW LIST"
1030 LOCATE 9,26:PRINT "C. DISPLAY LIST"
1040 LOCATE 11,26:PRINT "D. RETRIEVE STORED LIST"
1050 LOCATE 13,26:PRINT "E. STORE LIST"
1060 LOCATE 15,26:PRINT "F. MODIFY LIST"
1070 LOCATE 17,26:PRINT "G. DELETE STORED LIST"
1080 LOCATE 19,26:PRINT "H. PRINT ANCESTRY CHART"
1095 LOCATE 24,5:INPUT "PRESS LETTER TO SELECT";B$
1110 IF B$="A" THEN 30
1115 IF B$="a" THEN 30
1120 IF B$="B" THEN 200
1125 IF B$="b" THEN 200
1130 IF B$="C" THEN 300
1135 IF B$="c" THEN 300
1140 IF B$="D" THEN 400
1145 IF B$="d" THEN 400
1150 IF B$="E" THEN 600
1155 IF B$="e" THEN 600
1160 IF B$="F" THEN 800
1165 IF B$="f" THEN 800
1170 IF B$="G" THEN 700
1175 IF B$="g" THEN 700
1180 IF B$="H" THEN 3000
1185 IF B$="h" THEN 3000
1200 PRINT CHR$(7)
1210 GOTO 1000
1998 REM ******** FILE NAME SUBROUTINE ***********8
2000 LOCATE 12,29:INPUT"ENTER FILE NAME ";F$
2020 RETURN
2998 REM ********** PRINT SUBROUTINE ***********
3000 CLS:LOCATE 10,20
3010 PRINT "BE SURE PRINTER IS ON"
3015 LOCATE 12,20
3020 INPUT "PRESS ENTER WHEN READY",A$
3025 LPRINT CHR$(14);"ANCESTRY CHART"
3030 CLS:RESTORE:LOCATE 12,19
3035 PRINT "****** THE CHART IS BEING PRINTED ******"
3040 FOR I=1 TO 31
3050 T=1
3060 READ A
3070 IF A>1 THEN T=11
3080 IF A>3 THEN T=25
3090 IF A>7 THEN T=37
3100 IF A>15 THEN T=55
3105 LPRINT CHR$(0)
3110 LPRINT TAB(T);A;
3120 IF N$(A)="" THEN LPRINT "?":GOTO 3140
3130 LPRINT N$(A)
3140 NEXT I
3142 LPRINT CHR$(12)
3145 CLS
3150 LOCATE 12,20
3170 GOTO 990:REM RETURN TO MAIN MENU
3998 REM ******* DATA ******
4000 DATA 16,8,17,4,18
4010 DATA 9,19,2,20,10
4020 DATA 21,5,22,11,23
4030 DATA 1,24,12,25,6
4040 DATA 26,13,27,3,28
4050 DATA 14,29,7,30,15,31